import request from '@/utils/request';

// 用户登录
export function signIn(name,pwd) {
	return request({
		url: `http://localhost/api/system/user/login/${name}/${pwd}`,
		method: 'post'
	});
}

// 用户退出登录
export function signOut(data) {
	return request({
		url: '/user/signOut',
		method: 'post',
		data,
	});
}

// 修改用户
export function updateUser(data) {
	return request({
		url: 'http://localhost/api/system/user/updateUser',
		method: 'post',
		data,
	});
}

// 查询所有用户
export function findPageUser(userName,page,limit) {
	return request({
		url: `http://localhost/api/system/user/findPageUser?userName=${userName}&page=${page}&limit=${limit}`,
		method: 'get',
	});
}


// 新增用户
export function addUser(data) {
	return request({
		url: `http://localhost/api/system/user/addUser`,
		method: 'post',
		data
	});
}


// 删除用户
export function deleteUser(userId) {
	return request({
		url: `http://localhost/api/system/user/deleteUser?userId=${userId}`,
		method: 'post',
	});
}


